/*
 * CAudioManager.h
 *
 *  Created on: Sep 6, 2011
 *      Author: welcome
 */

#ifndef CAUDIOMANAGER_H_
#define CAUDIOMANAGER_H_
//
#include "CAudioPresenter.h"

namespace GGEngine {

typedef struct _AudioData {
	int index;
	int cnt;
	CAudioPresenter *audio;
	CMediaSound *sound;
	struct _AudioData *next;
} AudioData_t;

class CAudioManager {
private:
	CAudioManager();
	virtual ~CAudioManager();
	static AudioData_t m_data;
	static unsigned int m_index;
public:
	static int init();
	static void destroy();
	static int playAudio(const char* location, int cnt);
	static int playLoopAudio(const char* location);
	static void stopLoopAudio(int index);
	static void skiptime();
	static void pause(int index);
	static void resume(int index);

private:
	static void deleteAudioData(AudioData_t* p);
};

} /* namespace GGEngine */
#endif /* CAUDIOMANAGER_H_ */
